package cn.lsnu.common.log.controller;


import cn.lsnu.common.interfacetools.interfacecontroller.BaseController;
import cn.lsnu.common.interfacetools.interfaceentity.Page;
import cn.lsnu.common.log.entity.Log;
import cn.lsnu.common.log.service.LogService;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

@Controller
@RequestMapping("/log/logweb")
public class LogController extends BaseController {

    @Resource(name="logService")
   private LogService logService;




    @RequestMapping("/list")
    public String loginList(){

        return "webpage/common/sys/sys_log";
    }
    @RequestMapping("/listjson")
    public @ResponseBody
    Page<Log> logListJsons(Log logEntity) throws Exception {
        Page<Log> lists =  logService.findPage(logEntity);
        System.out.println(lists.toString());
        return lists;
    }
}
